package net.crowdloud.client;

import net.crowdloud.client.crowdLoud.ButtonAllCrowdLoud;
import net.crowdloud.client.groups.ButtonGroups;
import net.crowdloud.client.groups.GroupsList;
import net.crowdloud.client.tags.ButtonTags;

import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * 
 * @Feature
 */
public class Home extends VerticalPanel {

	public Home(String[] groups) {

		VerticalPanel vp = new VerticalPanel();
		vp.setSize("97%", "100%");

		vp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);

		HorizontalPanel hp = new HorizontalPanel();

		hp.setSpacing(5);

		hp.setWidth("600px");

		hp.add(new ButtonAllCrowdLoud(null));

		hp.add(new ButtonGroups());

		hp.add(new ButtonTags());

		vp.add(hp);

		vp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);

		VerticalPanel vp1 = new VerticalPanel();
		vp1.setSize("100%", "100%");
		vp1.setSpacing(10);

		vp1.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		HTML html = new HTML(
				"<br><br><br><b><font color='blue' size='3'>CROWD LOUD GROUPS</font></b> ");
		vp1.add(html);

		vp1.add(new GroupsList(groups));

		vp.add(vp1);

		this.add(vp);
	}
}
